home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / inet / rfc / rfc1349 < prev    next >
Text File  |  1992-07-06  |  69KB  |  1,625 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. Network Working Group                                        P. Almquist
  7. Request for Comments: 1349                                    Consultant
  8. Updates: RFCs 1248, 1247, 1195,                                July 1992
  9.          1123, 1122, 1060, 791
  10.  
  11.  
  12.  
  13.  
  14.              Type of Service in the Internet Protocol Suite
  15.  
  16. Status of This Memo
  17.  
  18.    This document specifies an IAB standards track protocol for the
  19.    Internet community, and requests discussion and suggestions for
  20.    improvements.  Please refer to the current edition of the "IAB
  21.    Official Protocol Standards" for the standardization state and status
  22.    of this protocol.  Distribution of this memo is unlimited.
  23.  
  24. Summary
  25.  
  26.    This memo changes and clarifies some aspects of the semantics of the
  27.    Type of Service octet in the Internet Protocol (IP) header.  The
  28.    handling of IP Type of Service by both hosts and routers is specified
  29.    in some detail.
  30.  
  31.    This memo defines a new TOS value for requesting that the network
  32.    minimize the monetary cost of transmitting a datagram.  A number of
  33.    additional new TOS values are reserved for future experimentation and
  34.    standardization.  The ability to request that transmission be
  35.    optimized along multiple axes (previously accomplished by setting
  36.    multiple TOS bits simultaneously) is removed.  Thus, for example, a
  37.    single datagram can no longer request that the network simultaneously
  38.    minimize delay and maximize throughput.
  39.  
  40.    In addition, there is a minor conflict between the Host Requirements
  41.    (RFC-1122 and RFC-1123) and a number of other standards concerning
  42.    the sizes of the fields in the Type of Service octet.  This memo
  43.    resolves that conflict.
  44.  
  45. Table of Contents
  46.  
  47.    1.  Introduction ...............................................    3
  48.  
  49.    2.  Goals and Philosophy .......................................    3
  50.  
  51.    3.  Specification of the Type of Service Octet .................    4
  52.  
  53.    4.  Specification of the TOS Field .............................    5
  54.  
  55.  
  56.  
  57. Almquist                                                        [Page 1]
  58.  
  59.  
  60.  
  61. RFC 1349                    Type of Service                    July 1992
  62.  
  63.  
  64.    5.  Use of the TOS Field in the Internet Protocols .............    6
  65.       5.1  Internet Control Message Protocol (ICMP) ...............    6
  66.       5.2  Transport Protocols ....................................    7
  67.       5.3  Application Protocols ..................................    7
  68.  
  69.    6.  ICMP and the TOS Facility ..................................    8
  70.       6.1  Destination Unreachable ................................    8
  71.       6.2  Redirect ...............................................    9
  72.  
  73.    7.  Use of the TOS Field in Routing ............................    9
  74.       7.1  Host Routing ...........................................   10
  75.       7.2  Forwarding .............................................   12
  76.  
  77.    8.  Other consequences of TOS ..................................   13
  78.  
  79.    APPENDIX A.  Updates to Other Specifications ...................   14
  80.       A.1  RFC-792 (ICMP) .........................................   14
  81.       A.2  RFC-1060 (Assigned Numbers) ............................   14
  82.       A.3  RFC-1122 and RFC-1123 (Host Requirements) ..............   16
  83.       A.4  RFC-1195 (Integrated IS-IS) ............................   16
  84.       A.5  RFC-1247 (OSPF) and RFC-1248 (OSPF MIB) ................   17
  85.  
  86.    APPENDIX B.  Rationale .........................................   18
  87.       B.1  The Minimize Monetary Cost TOS Value ...................   18
  88.       B.2  The Specification of the TOS Field .....................   19
  89.       B.3  The Choice of Weak TOS Routing .........................   21
  90.       B.4  The Retention of Longest Match Routing .................   22
  91.       B.5  The Use of Destination Unreachable .....................   23
  92.  
  93.    APPENDIX C.  Limitations of the TOS Mechanism ..................   24
  94.       C.1  Inherent Limitations ...................................   24
  95.       C.2  Limitations of this Specification ......................   25
  96.  
  97.    References .....................................................   27
  98.  
  99.    Acknowledgements ...............................................   28
  100.  
  101.    Security Considerations ........................................   28
  102.  
  103.    Author's Address ...............................................   28
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115. Almquist                                                        [Page 2]
  116.  
  117.  
  118.  
  119. RFC 1349                    Type of Service                    July 1992
  120.  
  121.  
  122. 1.  Introduction
  123.  
  124.    Paths through the Internet vary widely in the quality of service they
  125.    provide.  Some paths are more reliable than others.  Some impose high
  126.    call setup or per-packet charges, while others do not do usage-based
  127.    charging.  Throughput and delay also vary widely.  Often there are
  128.    tradeoffs: the path that provides the highest throughput may well not
  129.    be the one that provides the lowest delay or the lowest monetary
  130.    cost.  Therefore, the "optimal" path for a packet to follow through
  131.    the Internet may depend on the needs of the application and its user.
  132.  
  133.    Because the Internet itself has no direct knowledge of how to
  134.    optimize the path for a particular application or user, the IP
  135.    protocol [11] provides a (rather limited) facility for upper layer
  136.    protocols to convey hints to the Internet Layer about how the
  137.    tradeoffs should be made for the particular packet.  This facility is
  138.    the "Type of Service" facility, abbreviated as the "TOS facility" in
  139.    this memo.
  140.  
  141.    Although the TOS facility has been a part of the IP specification
  142.    since the beginning, it has been little used in the past.  However,
  143.    the Internet host specification [1,2] now mandates that hosts use the
  144.    TOS facility.  Additionally, routing protocols (including OSPF [10]
  145.    and Integrated IS-IS [7]) have been developed which can compute
  146.    routes separately for each type of service.  These new routing
  147.    protocols make it practical for routers to consider the requested
  148.    type of service when making routing decisions.
  149.  
  150.    This specification defines in detail how hosts and routers use the
  151.    TOS facility.  Section 2 introduces the primary considerations that
  152.    motivated the design choices in this specification.  Sections 3 and 4
  153.    describe the Type of Service octet in the IP header and the values
  154.    which the TOS field of that octet may contain.  Section 5 describes
  155.    how a host (or router) chooses appropriate values to insert into the
  156.    TOS fields of the IP datagrams it originates.  Sections 6 and 7
  157.    describe the ICMP Destination Unreachable and Redirect messages and
  158.    how TOS affects path choice by both hosts and routers.  Section 8
  159.    describes some additional ways in which TOS may optionally affect
  160.    packet processing.  Appendix A describes how this specification
  161.    updates a number of existing specifications.  Appendices B and C
  162.    expand on the discussion in Section 2.
  163.  
  164. 2.  Goals and Philosophy
  165.  
  166.    The fundamental rule that guided this specification is that a host
  167.    should never be penalized for using the TOS facility.  If a host
  168.    makes appropriate use of the TOS facility, its network service should
  169.    be at least as good as (and hopefully better than) it would have been
  170.  
  171.  
  172.  
  173. Almquist                                                        [Page 3]
  174.  
  175.  
  176.  
  177. RFC 1349                    Type of Service                    July 1992
  178.  
  179.  
  180.    if the host had not used the facility.  This goal was considered
  181.    particularly important because it is unlikely that any specification
  182.    which did not meet this goal, no matter how good it might be in other
  183.    respects, would ever become widely deployed and used.  A particular
  184.    consequence of this goal is that if a network cannot provide the TOS
  185.    requested in a packet, the network does not discard the packet but
  186.    instead delivers it the same way it would have been delivered had
  187.    none of the TOS bits been set.
  188.  
  189.    Even though the TOS facility has not been widely used in the past, it
  190.    is a goal of this memo to be as compatible as possible with existing
  191.    practice.  Primarily this means that existing host implementations
  192.    should not interact badly with hosts and routers which implement the
  193.    specifications of this memo, since TOS support is almost non-existent
  194.    in routers which predate this specification.  However, this memo does
  195.    attempt to be compatible with the treatment of IP TOS in OSPF and
  196.    Integrated IS-IS.
  197.  
  198.    Because the Internet community does not have much experience with
  199.    TOS, it is important that this specification allow easy definition
  200.    and deployment of new and experimental types of service.  This goal
  201.    has had a significant impact on this specification.  In particular,
  202.    it led to the decision to fix permanently the size of the TOS field
  203.    and to the decision that hosts and routers should be able to handle a
  204.    new type of service correctly without having to understand its
  205.    semantics.
  206.  
  207.    Appendix B of this memo provides a more detailed explanation of the
  208.    rationale behind particular aspects of this specification.
  209.  
  210. 3.  Specification of the Type of Service Octet
  211.  
  212.    The TOS facility is one of the features of the Type of Service octet
  213.    in the IP datagram header.  The Type of Service octet consists of
  214.    three fields:
  215.  
  216.                 0     1     2     3     4     5     6     7
  217.              +-----+-----+-----+-----+-----+-----+-----+-----+
  218.              |                 |                       |     |
  219.              |   PRECEDENCE    |          TOS          | MBZ |
  220.              |                 |                       |     |
  221.              +-----+-----+-----+-----+-----+-----+-----+-----+
  222.  
  223.    The first field, labeled "PRECEDENCE" above, is intended to denote
  224.    the importance or priority of the datagram.  This field is not
  225.    discussed in detail in this memo.
  226.  
  227.    The second field, labeled "TOS" above, denotes how the network should
  228.  
  229.  
  230.  
  231. Almquist                                                        [Page 4]
  232.  
  233.  
  234.  
  235. RFC 1349                    Type of Service                    July 1992
  236.  
  237.  
  238.    make tradeoffs between throughput, delay, reliability, and cost.  The
  239.    TOS field is the primary topic of this memo.
  240.  
  241.    The last field, labeled "MBZ" (for "must be zero") above, is
  242.    currently unused.  The originator of a datagram sets this field to
  243.    zero (unless participating in an Internet protocol experiment which
  244.    makes use of that bit).  Routers and recipients of datagrams ignore
  245.    the value of this field.  This field is copied on fragmentation.
  246.  
  247.    In the past there has been some confusion about the size of the TOS
  248.    field.  RFC-791 defined it as a three bit field, including bits 3-5
  249.    in the figure above.  It included bit 6 in the MBZ field.  RFC-1122
  250.    added bits 6 and 7 to the TOS field, eliminating the MBZ field.  This
  251.    memo redefines the TOS field to be the four bits shown in the figure
  252.    above.  The reasons for choosing to make the TOS field four bits wide
  253.    can be found in Appendix B.2.
  254.  
  255. 4.  Specification of the TOS Field
  256.  
  257.    As was stated just above, this memo redefines the TOS field as a four
  258.    bit field.  Also contrary to RFC-791, this memo defines the TOS field
  259.    as a single enumerated value rather than as a set of bits (where each
  260.    bit has its own meaning).  This memo defines the semantics of the
  261.    following TOS field values (expressed as binary numbers):
  262.  
  263.                     1000   --   minimize delay
  264.                     0100   --   maximize throughput
  265.                     0010   --   maximize reliability
  266.                     0001   --   minimize monetary cost
  267.                     0000   --   normal service
  268.  
  269.    The values used in the TOS field are referred to in this memo as "TOS
  270.    values", and the value of the TOS field of an IP packet is referred
  271.    to in this memo as the "requested TOS".  The TOS field value 0000 is
  272.    referred to in this memo as the "default TOS."
  273.  
  274.    Because this specification redefines TOS values to be integers rather
  275.    than sets of bits, computing the logical OR of two TOS values is no
  276.    longer meaningful.  For example, it would be a serious error for a
  277.    router to choose a low delay path for a packet whose requested TOS
  278.    was 1110 simply because the router noted that the former "delay bit"
  279.    was set.
  280.  
  281.    Although the semantics of values other than the five listed above are
  282.    not defined by this memo, they are perfectly legal TOS values, and
  283.    hosts and routers must not preclude their use in any way.  As will
  284.    become clear after reading the remainder of this memo, only the
  285.    default TOS is in any way special.  A host or router need not (and
  286.  
  287.  
  288.  
  289. Almquist                                                        [Page 5]
  290.  
  291.  
  292.  
  293. RFC 1349                    Type of Service                    July 1992
  294.  
  295.  
  296.    except as described in Section 8 should not) make any distinction
  297.    between TOS values whose semantics are defined by this memo and those
  298.    that are not.
  299.  
  300.    It is important to note the use of the words "minimize" and
  301.    "maximize" in the definitions of values for the TOS field.  For
  302.    example, setting the TOS field to 1000 (minimize delay) does not
  303.    guarantee that the path taken by the datagram will have a delay that
  304.    the user considers "low".  The network will attempt to choose the
  305.    lowest delay path available, based on its (often imperfect)
  306.    information about path delay.  The network will not discard the
  307.    datagram simply because it believes that the delay of the available
  308.    paths is "too high" (actually, the network manager can override this
  309.    behavior through creative use of routing metrics, but this is
  310.    strongly discouraged: setting the TOS field is intended to give
  311.    better service when it is available, rather than to deny service when
  312.    it is not).
  313.  
  314. 5.  Use of the TOS Field in the Internet Protocols
  315.  
  316.    For the TOS facility to be useful, the TOS fields in IP packets must
  317.    be filled in with reasonable values.  This section discusses how
  318.    protocols above IP choose appropriate values.
  319.  
  320.    5.1  Internet Control Message Protocol (ICMP)
  321.  
  322.       ICMP [8,9,12] defines a number of messages for performing error
  323.       reporting and diagnostic functions for the Internet Layer.  This
  324.       section describes how a host or router chooses appropriate TOS
  325.       values for ICMP messages it originates.  The TOS facility also
  326.       affects the origination and processing of ICMP Redirects and ICMP
  327.       Destination Unreachables, but that is the topic of Section 6.
  328.  
  329.       For purposes of this discussion, it is useful to divide ICMP
  330.       messages into three classes:
  331.  
  332.        o   ICMP error messages include ICMP message types 3 (Destination
  333.            Unreachable), 4 (Source Quench), 5 (Redirect), 11 (Time
  334.            Exceeded), and 12 (Parameter Problem).
  335.  
  336.        o   ICMP request messages include ICMP message types 8 (Echo), 10
  337.            (Router Solicitation), 13 (Timestamp), 15 (Information
  338.            Request -- now obsolete), and 17 (Address Mask Request).
  339.  
  340.        o   ICMP reply messages include ICMP message types 0 (Echo
  341.            Reply), 9 (Router Advertisement), 14 (Timestamp Reply), 16
  342.            (Information Reply -- also obsolete), and 18 (Address Mask
  343.            Reply).
  344.  
  345.  
  346.  
  347. Almquist                                                        [Page 6]
  348.  
  349.  
  350.  
  351. RFC 1349                    Type of Service                    July 1992
  352.  
  353.  
  354.       An ICMP error message is always sent with the default TOS (0000).
  355.  
  356.       An ICMP request message may be sent with any value in the TOS
  357.       field.  A mechanism to allow the user to specify the TOS value to
  358.       be used would be a useful feature in many applications that
  359.       generate ICMP request messages.
  360.  
  361.       An ICMP reply message is sent with the same value in the TOS field
  362.       as was used in the corresponding ICMP request message.
  363.  
  364.    5.2  Transport Protocols
  365.  
  366.       When sending a datagram, a transport protocol uses the TOS
  367.       requested by the application.  There is no requirement that both
  368.       ends of a transport connection use the same TOS.  For example, the
  369.       sending side of a bulk data transfer application should request
  370.       that throughput be maximized, whereas the receiving side might
  371.       request that delay be minimized (assuming that it is primarily
  372.       sending small acknowledgement packets).  It may be useful for a
  373.       transport protocol to provide applications with a mechanism for
  374.       learning the value of the TOS field that accompanied the most
  375.       recently received data.
  376.  
  377.       It is quite permissible to switch to a different TOS in the middle
  378.       of a connection if the nature of the traffic being generated
  379.       changes.  An example of this would be SMTP, which spends part of
  380.       its time doing bulk data transfer and part of its time exchanging
  381.       short command messages and responses.
  382.  
  383.       TCP [13] should use the same TOS for datagrams containing only TCP
  384.       control information as it does for datagrams which contain user
  385.       data.  Although it might seem intuitively correct to always
  386.       request that the network minimize delay for segments containing
  387.       acknowledgements but no data, doing so could corrupt TCP's round
  388.       trip time estimates.
  389.  
  390.    5.3  Application Protocols
  391.  
  392.       Applications are responsible for choosing appropriate TOS values
  393.       for any traffic they originate.  The Assigned Numbers document
  394.       [15] lists the TOS values to be used by a number of common network
  395.       applications.  For other applications, it is the responsibility of
  396.       the application's designer or programmer to make a suitable
  397.       choice, based on the nature of the traffic to be originated by the
  398.       application.
  399.  
  400.       It is essential for many sorts of network diagnostic applications,
  401.       and desirable for other applications, that the user of the
  402.  
  403.  
  404.  
  405. Almquist                                                        [Page 7]
  406.  
  407.  
  408.  
  409. RFC 1349                    Type of Service                    July 1992
  410.  
  411.  
  412.       application be able to override the TOS value(s) which the
  413.       application would otherwise choose.
  414.  
  415.       The Assigned Numbers document is revised and reissued
  416.       periodically.  Until RFC-1060, the edition current as this is
  417.       being written, has been superceded, readers should consult
  418.       Appendix A.2 of this memo.
  419.  
  420. 6.  ICMP and the TOS Facility
  421.  
  422.    Routers communicate routing information to hosts using the ICMP
  423.    protocol [12].  This section describes how support for the TOS
  424.    facility affects the origination and interpretation of ICMP Redirect
  425.    messages and certain types of ICMP Destination Unreachable messages.
  426.    This memo does not define any new extensions to the ICMP protocol.
  427.  
  428.    6.1  Destination Unreachable
  429.  
  430.       The ICMP Destination Unreachable message contains a code which
  431.       describes the reason that the destination is unreachable.  There
  432.       are four codes [1,12] which are particularly relevant to the topic
  433.       of this memo:
  434.  
  435.          0 -- network unreachable
  436.          1 -- host unreachable
  437.         11 -- network unreachable for type of service
  438.         12 -- host unreachable for type of service
  439.  
  440.       A router generates a code 11 or code 12 Destination Unreachable
  441.       when an unreachable destination (network or host) would have been
  442.       reachable had a different TOS value been specified.  A router
  443.       generates a code 0 or code 1 Destination Unreachable in other
  444.       cases.
  445.  
  446.       A host receiving a Destination Unreachable message containing any
  447.       of these codes should recognize that it may result from a routing
  448.       transient.  The host should therefore interpret the message as
  449.       only a hint, not proof, that the specified destination is
  450.       unreachable.
  451.  
  452.       The use of codes 11 and 12 may seem contrary to the statement in
  453.       Section 2 that packets should not be discarded simply because the
  454.       requested TOS cannot be provided.  The rationale for having these
  455.       codes and the limited cases in which they are expected to be used
  456.       are described in Appendix B.5.
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463. Almquist                                                        [Page 8]
  464.  
  465.  
  466.  
  467. RFC 1349                    Type of Service                    July 1992
  468.  
  469.  
  470.    6.2  Redirect
  471.  
  472.       The ICMP Redirect message also includes a code, which specifies
  473.       the class of datagrams to which the Redirect applies.  There are
  474.       currently four codes defined:
  475.  
  476.          0 -- redirect datagrams for the network
  477.          1 -- redirect datagrams for the host
  478.          2 -- redirect datagrams for the type of service and network
  479.          3 -- redirect datagrams for the type of service and host
  480.  
  481.       A router generates a code 3 Redirect when the Redirect applies
  482.       only to IP packets which request a particular TOS value.  A router
  483.       generates a code 1 Redirect instead when the the optimal next hop
  484.       on the path to the destination would be the same for any TOS
  485.       value.  In order to minimize the potential for host confusion,
  486.       routers should refrain from using codes 0 and 2 in Redirects
  487.       [3,6].
  488.  
  489.       Although the current Internet Host specification [1] only requires
  490.       hosts to correctly handle code 0 and code 1 Redirects, a host
  491.       should also correctly handle code 2 and code 3 Redirects, as
  492.       described in Section 7.1 of this memo.  If a host does not, it is
  493.       better for the host to treat code 2 as equivalent to code 0 and
  494.       code 3 as equivalent to code 1 than for the host to simply ignore
  495.       code 2 and code 3 Redirects.
  496.  
  497. 7.  Use of the TOS Field in Routing
  498.  
  499.    Both hosts and routers should consider the value of the TOS field of
  500.    a datagram when choosing an appropriate path to get the datagram to
  501.    its destination.  The mechanisms for doing so are discussed in this
  502.    section.
  503.  
  504.    Whether a packet's TOS value actually affects the path it takes
  505.    inside of a particular routing domain is a choice made by the routing
  506.    domain's network manager.  In many routing domains the paths are
  507.    sufficiently homogeneous in nature that there is no reason for
  508.    routers to choose different paths based up the TOS field in a
  509.    datagram.  Inside such a routing domain, the network manager may
  510.    choose to limit the size of the routing database and of routing
  511.    protocol updates by only defining routes for the default (0000) TOS.
  512.    Neither hosts nor routers should need to have any explicit knowledge
  513.    of whether TOS affects routing in the local routing domain.
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521. Almquist                                                        [Page 9]
  522.  
  523.  
  524.  
  525. RFC 1349                    Type of Service                    July 1992
  526.  
  527.  
  528.    7.1  Host Routing
  529.  
  530.       When a host (which is not also a router) wishes to send an IP
  531.       packet to a destination on another network or subnet, it needs to
  532.       choose an appropriate router to send the packet to.  According to
  533.       the IP Architecture, it does so by maintaining a route cache and a
  534.       list of default routers.  Each entry in the route cache lists a
  535.       destination (IP address) and the appropriate router to use to
  536.       reach that destination.  The host learns the information stored in
  537.       its route cache through the ICMP Redirect mechanism.  The host
  538.       learns the list of default routers either from static
  539.       configuration information or by using the ICMP Router Discovery
  540.       mechanism [8].  When the host wishes to send an IP packet, it
  541.       searches its route cache for a route matching the destination
  542.       address in the packet.  If one is found it is used; if not, the
  543.       packet is sent to one of the default routers.  All of this is
  544.       described in greater detail in section 3.3.1 of RFC-1122 [1].
  545.  
  546.       Adding support for the TOS facility changes the host routing
  547.       procedure only slightly.  In the following, it is assumed that (in
  548.       accordance with the current Internet Host specification [1]) the
  549.       host treats code 0 (redirect datagrams for the network) Redirects
  550.       as if they were code 1 (redirect datagrams for the host)
  551.       Redirects.  Similarly, it is assumed that the host treats code 2
  552.       (redirect datagrams for the network and type of service) Redirects
  553.       as if they were code 3 (redirect datagrams for the host and type
  554.       of service) Redirects.  Readers considering violating these
  555.       assumptions should be aware that long and careful consideration of
  556.       the way in which Redirects are treated is necessary to avoid
  557.       situations where every packet sent to some destination provokes a
  558.       Redirect.  Because these assumptions match the recommendations of
  559.       Internet Host specification, that careful consideration is beyond
  560.       the scope of this memo.
  561.  
  562.       As was described in Section 6.2, some ICMP Redirects apply only to
  563.       IP packets which request a particular TOS.  Thus, a host (at least
  564.       conceptually) needs to store two types of entries in its route
  565.       cache:
  566.  
  567.        type 1: { destination, TOS, router }
  568.  
  569.        type 2: { destination, *, router }
  570.  
  571.       where type 1 entries result from the receipt of code 3 (or code 1)
  572.       Redirects and type 2 entries result from the receipt of code 2 (or
  573.       code 0) Redirects.
  574.  
  575.  
  576.  
  577.  
  578.  
  579. Almquist                                                       [Page 10]
  580.  
  581.  
  582.  
  583. RFC 1349                    Type of Service                    July 1992
  584.  
  585.  
  586.       When a host wants to send a packet, it first searches the route
  587.       cache for a type 1 entry whose destination matches the destination
  588.       address of the packet and whose TOS matches the requested TOS in
  589.       the packet.  If it doesn't find one, the host searches its route
  590.       cache again, this time looking for a type 2 entry whose
  591.       destination matches the destination address of the packet.  If
  592.       either of these searches finds a matching entry, the packet is
  593.       sent to the router listed in the matching entry.  Otherwise, the
  594.       packet is sent to one of the routers on the list of default
  595.       routers.
  596.  
  597.       When a host creates (or updates) a type 2 entry, it must flush
  598.       from its route cache any type 1 entries which have the same
  599.       destination.  This is necessary for correctness, since the type 1
  600.       entry may be obsolete but would continue to be used if it weren't
  601.       flushed because type 1 entries are always preferred over type 2
  602.       entries.
  603.  
  604.       However, the converse is not true: when a host creates a type 1
  605.       entry, it should not flush a type 2 entry that has the same
  606.       destination.  In this case, the type 1 entry will properly
  607.       override the type 2 entry for packets whose destination address
  608.       and requested TOS match the type 1 entry.  Because the type 2
  609.       entry may well specify the correct router for some TOS values
  610.       other than the one specified in the type 1 entry, saving the type
  611.       2 entry will likely cut down on the number of Redirects which the
  612.       host would otherwise receive.  This savings can potentially be
  613.       substantial if one of the Redirects which was avoided would have
  614.       created a new type 2 entry (thereby causing the new type 1 entry
  615.       to be flushed).  That can happen, for example, if only some of the
  616.       routers on the local net are part of a routing domain that
  617.       computes separate routes for each TOS.
  618.  
  619.       As an alternative, a host may treat all Redirects as if they were
  620.       code 3 (redirect datagrams for hosts and type of service)
  621.       Redirects.  This alternative allows the host to have only type 1
  622.       route cache entries, thereby simplifying route lookup and
  623.       eliminating the need for the rules in the previous two paragraphs.
  624.       The disadvantage of this approach is that it increases the size of
  625.       the route cache and the amount of Redirect traffic if the host
  626.       sends packets with a variety of requested TOS's to a destination
  627.       for which the host should use the same router regardless of the
  628.       requested TOS.  There is not yet sufficient experience with the
  629.       TOS facility to know whether that disadvantage would be serious
  630.       enough in practice to outweigh the simplicity of this approach.
  631.  
  632.       Despite RFC-1122, some hosts acquire their routing information by
  633.       "wiretapping" a routing protocol instead of by using the
  634.  
  635.  
  636.  
  637. Almquist                                                       [Page 11]
  638.  
  639.  
  640.  
  641. RFC 1349                    Type of Service                    July 1992
  642.  
  643.  
  644.       mechanisms described above.  Such hosts will need to follow the
  645.       procedures described in Section 7.2 (except of course that hosts
  646.       will not send ICMP Destination Unreachables or ICMP Redirects).
  647.  
  648.    7.2  Forwarding
  649.  
  650.       A router in the Internet should be able to consider the value of
  651.       the TOS field when choosing an appropriate path over which to
  652.       forward an IP packet.  How a router does this is a part of the
  653.       more general issue of how a router picks appropriate paths.  This
  654.       larger issue can be extremely complex [4], and is beyond the scope
  655.       of this memo.  This discussion should therefore be considered only
  656.       an overview.  Implementors should consult the Router Requirements
  657.       specification [3] and the the specifications of the routing
  658.       protocols they implement for details.
  659.  
  660.       A router associates a TOS value with each route in its forwarding
  661.       table.  The value can be any of the possible values of the TOS
  662.       field in an IP datagram (including those values whose semantics
  663.       are yet to be defined).  Any routes learned using routing
  664.       protocols which support TOS are assigned appropriate TOS value by
  665.       those protocols.  Routes learned using other routing protocols are
  666.       always assigned the default TOS value (0000).  Static routes have
  667.       their TOS values assigned by the network manager.
  668.  
  669.       When a router wants to forward a packet, it first looks up the
  670.       destination address in its forwarding table.  This yields a set of
  671.       candidate routes.  The set may be empty (if the destination is
  672.       unreachable), or it may contain one or more routes to the
  673.       destination.  If the set is not empty, the TOS values of the
  674.       routes in the set are examined.  If the set contains a route whose
  675.       TOS exactly matches the TOS field of the packet being forwarded
  676.       then that route is chosen.  If not but the set contains a route
  677.       with the default TOS then that route is chosen.
  678.  
  679.       If no route is found, or if the the chosen route has an infinite
  680.       metric, the destination is considered to be unreachable.  The
  681.       packet is discarded and an ICMP Destination Unreachable is
  682.       returned to the source.  Normally, the Unreachable uses code 0
  683.       (Network unreachable) or 1 (Host unreachable).  If, however, a
  684.       route to the destination exists which has a different TOS value
  685.       and a non-infinite metric then code 11 (Network unreachable for
  686.       type of service) or code 12 (Host unreachable for type of service)
  687.       must be used instead.
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695. Almquist                                                       [Page 12]
  696.  
  697.  
  698.  
  699. RFC 1349                    Type of Service                    July 1992
  700.  
  701.  
  702. 8.  Other consequences of TOS
  703.  
  704.    The TOS field in a datagram primarily affects the path chosen through
  705.    the network, but an implementor may choose to have TOS also affect
  706.    other aspects of how the datagram is handled.  For example, a host or
  707.    router might choose to give preferential queuing on network output
  708.    queues to datagrams which have requested that delay be minimized.
  709.    Similarly, a router forced by overload to discard packets might
  710.    attempt to avoid discarding packets that have requested that
  711.    reliability be maximized.  At least one paper [14] has explored these
  712.    ideas in some detail, but little is known about how well such special
  713.    handling would work in practice.
  714.  
  715.    Additionally, some Link Layer protocols have their own quality of
  716.    service mechanisms.  When a router or host transmits an IP packet, it
  717.    might request from the Link Layer a quality of service as close as
  718.    possible to the one requested in the TOS field in the IP header.
  719.    Long ago an attempt (RFC-795) was made to codify how this might be
  720.    done, but that document describes Link Layer protocols which have
  721.    since become obsolete and no more recent document on the subject has
  722.    been written.
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753. Almquist                                                       [Page 13]
  754.  
  755.  
  756.  
  757. RFC 1349                    Type of Service                    July 1992
  758.  
  759.  
  760. APPENDIX A.  Updates to Other Specifications
  761.  
  762.    While this memo is primarily an update to the IP protocol
  763.    specification [11], it also peripherally affects a number of other
  764.    specifications.  This appendix describes those peripheral effects.
  765.    This information is included in an appendix rather than in the main
  766.    body of the document because most if not all of these other
  767.    specifications will be updated in the future.  As that happens, the
  768.    information included in this appendix will become obsolete.
  769.  
  770.    A.1  RFC-792 (ICMP)
  771.  
  772.       RFC-792 [12] defines a set of codes indicating reasons why a
  773.       destination is unreachable.  This memo describes the use of two
  774.       additional codes:
  775.  
  776.         11 -- network unreachable for type of service
  777.         12 -- host unreachable for type of service
  778.  
  779.       These codes were defined in RFC-1122 [1] but were not included in
  780.       RFC-792.
  781.  
  782.    A.2  RFC-1060 (Assigned Numbers)
  783.  
  784.       RFC-1060 [15] describes the old interpretation of the TOS field
  785.       (as three independent bits, with no way to specify that monetary
  786.       cost should be minimized).  Although it is likely obvious how the
  787.       values in RFC-1060 ought to be interpreted in light of this memo,
  788.       the information from that RFC is reproduced here.  The only actual
  789.       changes are for ICMP (to conform to Section 5.1 of this memo) and
  790.       NNTP:
  791.  
  792.                         ----- Type-of-Service Value -----
  793.  
  794.          Protocol           TOS Value
  795.  
  796.          TELNET (1)         1000                 (minimize delay)
  797.  
  798.          FTP
  799.            Control          1000                 (minimize delay)
  800.            Data (2)         0100                 (maximize throughput)
  801.  
  802.          TFTP               1000                 (minimize delay)
  803.  
  804.          SMTP (3)
  805.            Command phase    1000                 (minimize delay)
  806.            DATA phase       0100                 (maximize throughput)
  807.  
  808.  
  809.  
  810.  
  811. Almquist                                                       [Page 14]
  812.  
  813.  
  814.  
  815. RFC 1349                    Type of Service                    July 1992
  816.  
  817.  
  818.                         ----- Type-of-Service Value -----
  819.  
  820.          Protocol           TOS Value
  821.  
  822.          Domain Name Service
  823.            UDP Query        1000                 (minimize delay)
  824.            TCP Query        0000
  825.            Zone Transfer    0100                 (maximize throughput)
  826.  
  827.          NNTP               0001                 (minimize monetary cost)
  828.  
  829.          ICMP
  830.            Errors           0000
  831.            Requests         0000 (4)
  832.            Responses        <same as request> (4)
  833.  
  834.          Any IGP            0010                 (maximize reliability)
  835.  
  836.          EGP                0000
  837.  
  838.          SNMP               0010                 (maximize reliability)
  839.  
  840.          BOOTP              0000
  841.  
  842.          Notes:
  843.  
  844.           (1) Includes all interactive user protocols (e.g., rlogin).
  845.  
  846.           (2) Includes all bulk data transfer protocols (e.g., rcp).
  847.  
  848.           (3) If the implementation does not support changing the TOS
  849.               during the lifetime of the connection, then the
  850.               recommended TOS on opening the connection is the default
  851.               TOS (0000).
  852.  
  853.           (4) Although ICMP request messages are normally sent with the
  854.               default TOS, there are sometimes good reasons why they
  855.               would be sent with some other TOS value.  An ICMP response
  856.               always uses the same TOS value as was used in the
  857.               corresponding ICMP request message.  See Section 5.1 of
  858.               this memo.
  859.  
  860.          An application may (at the request of the user) substitute 0001
  861.          (minimize monetary cost) for any of the above values.
  862.  
  863.          This appendix is expected to be obsoleted by the next revision
  864.          of the Assigned Numbers document.
  865.  
  866.  
  867.  
  868.  
  869. Almquist                                                       [Page 15]
  870.  
  871.  
  872.  
  873. RFC 1349                    Type of Service                    July 1992
  874.  
  875.  
  876.    A.3  RFC-1122 and RFC-1123 (Host Requirements)
  877.  
  878.       The use of the TOS field by hosts is described in detail in
  879.       RFC-1122 [1] and RFC-1123 [2].  The information provided there is
  880.       still correct, except that:
  881.  
  882.        (1) The TOS field is four bits wide rather than five bits wide.
  883.            The requirements that refer to the TOS field should refer
  884.            only to the four bits that make up the TOS field.
  885.  
  886.        (2) An application may set bit 6 of the TOS octet to a non-zero
  887.            value (but still must not set bit 7 to a non-zero value).
  888.  
  889.       These details will presumably be corrected in the next revision of
  890.       the Host Requirements specification, at which time this appendix
  891.       can be considered obsolete.
  892.  
  893.    A.4  RFC-1195 (Integrated IS-IS)
  894.  
  895.       Integrated IS-IS (sometimes known as Dual IS-IS) has multiple
  896.       metrics for each route.  Which of the metrics is used to route a
  897.       particular IP packet is determined by the TOS field in the packet.
  898.       This is described in detail in section 3.5 of RFC-1195 [7].
  899.  
  900.       The mapping from the value of the TOS field to an appropriate
  901.       Integrated IS-IS metric is described by a table in that section.
  902.       Although the specification in this memo is intended to be
  903.       substantially compatible with Integrated IS-IS, the extension of
  904.       the TOS field to four bits and the addition of a TOS value
  905.       requesting "minimize monetary cost" require minor modifications to
  906.       that table, as shown here:
  907.  
  908.          The IP TOS octet is mapped onto the four available metrics as
  909.          follows:
  910.  
  911.          Bits 0-2 (Precedence): (unchanged from RFC-1195)
  912.  
  913.          Bits 3-6 (TOS):
  914.  
  915.             0000    (all normal)               Use default metric
  916.             1000    (minimize delay)           Use delay metric
  917.             0100    (maximize throughput)      Use default metric
  918.             0010    (maximize reliability)     Use reliability metric
  919.             0001    (minimize monetary cost)   Use cost metric
  920.             other                              Use default metric
  921.  
  922.          Bit 7 (MBZ): This bit is ignored by Integrated IS-IS.
  923.  
  924.  
  925.  
  926.  
  927. Almquist                                                       [Page 16]
  928.  
  929.  
  930.  
  931. RFC 1349                    Type of Service                    July 1992
  932.  
  933.  
  934.       It is expected that the next revision of the Integrated IS-IS
  935.       specification will include this corrected table, at which time
  936.       this appendix can be considered obsolete.
  937.  
  938.    A.5  RFC-1247 (OSPF) and RFC-1248 (OSPF MIB)
  939.  
  940.       Although the specification in this memo is intended to be
  941.       substantially compatible with OSPF, the extension of the TOS field
  942.       to four bits requires minor modifications to the section that
  943.       describes the encoding of TOS values in Link State Advertisements,
  944.       described in section 12.3 of RFC-1247 [10].  The encoding is
  945.       summarized in Table 17 of that memo; what follows is an updated
  946.       version of table 17.  The numbers in the first column are decimal
  947.       integers, and the numbers in the second column are binary TOS
  948.       values:
  949.  
  950.                 OSPF encoding   TOS
  951.                 _____________________________________________
  952.  
  953.                 0               0000   normal service
  954.                 2               0001   minimize monetary cost
  955.                 4               0010   maximize reliability
  956.                 6               0011
  957.                 8               0100   maximize throughput
  958.                 10              0101
  959.                 12              0110
  960.                 14              0111
  961.                 16              1000   minimize delay
  962.                 18              1001
  963.                 20              1010
  964.                 22              1011
  965.                 24              1100
  966.                 26              1101
  967.                 28              1110
  968.                 30              1111
  969.  
  970.       The OSPF MIB, described in RFC-1248 [5], is entirely consistent
  971.       with this memo except for the textual comment which describes the
  972.       mapping of the old TOS flag bits into TOSType values.  TOSType
  973.       values use the same encoding of TOS values as OSPF's Link State
  974.       Advertisements do, so the above table also describes the mapping
  975.       between TOSType values (the first column) and TOS field values
  976.       (the second column).
  977.  
  978.       If RFC-1247 and RFC-1248 are revised in the future, it is expected
  979.       that this information will be incorporated into the revised
  980.       versions.  At that time, this appendix may be considered obsolete.
  981.  
  982.  
  983.  
  984.  
  985. Almquist                                                       [Page 17]
  986.  
  987.  
  988.  
  989. RFC 1349                    Type of Service                    July 1992
  990.  
  991.  
  992. APPENDIX B.  Rationale
  993.  
  994.    The main body of this memo has described the details of how TOS
  995.    facility works.  This appendix is for those who wonder why it works
  996.    that way.
  997.  
  998.    Much of what is in this document can be explained by the simple fact
  999.    that the goal of this document is to provide a clear and complete
  1000.    specification of the existing TOS facility rather than to design from
  1001.    scratch a new quality of service mechanism for IP.  While this memo
  1002.    does amend the facility in some small and carefully considered ways
  1003.    discussed below, the desirability of compatibility with existing
  1004.    specifications and uses of the TOS facility [1,2,7,10,11] was never
  1005.    in doubt.  This goal of backwards compatibility determined the broad
  1006.    outlines and many of the details of this specification.
  1007.  
  1008.    Much of the rest of this specification was determined by two
  1009.    additional goals, which were described more fully in Section 2.  The
  1010.    first was that hosts should never be penalized for using the TOS
  1011.    facility, since that would likely ensure that it would never be
  1012.    widely deployed.  The second was that the specification should make
  1013.    it easy, or at least possible, to define and deploy new types of
  1014.    service in the future.
  1015.  
  1016.    The three goals above did not eliminate all need for engineering
  1017.    choices, however, and in a few cases the goals proved to be in
  1018.    conflict with each other.  The remainder of this appendix discusses
  1019.    the rationale behind some of these engineering choices.
  1020.  
  1021.    B.1  The Minimize Monetary Cost TOS Value
  1022.  
  1023.       Because the Internet is becoming increasingly commercialized, a
  1024.       number of participants in the IETF's Router Requirements Working
  1025.       Group felt it would be important to have a TOS value which would
  1026.       allow a user to declare that monetary cost was more important than
  1027.       other qualities of the service.
  1028.  
  1029.       There was considerable debate over what exactly this value should
  1030.       mean.  Some felt, for example, that the TOS value should mean
  1031.       "must not cost money".  This was rejected for several reasons.
  1032.       Because it would request a particular level of service (cost = 0)
  1033.       rather than merely requesting that some service attribute be
  1034.       minimized or maximized, it would not only philosophically at odds
  1035.       with the other TOS values but would require special code in both
  1036.       hosts and routers.  Also, it would not be helpful to users who
  1037.       want their packets to travel via the least-cost path but can
  1038.       accept some level of cost when necessary.  Finally, since whether
  1039.       any particular routing domain considers the TOS field when routing
  1040.  
  1041.  
  1042.  
  1043. Almquist                                                       [Page 18]
  1044.  
  1045.  
  1046.  
  1047. RFC 1349                    Type of Service                    July 1992
  1048.  
  1049.  
  1050.       is a choice made by the network manager, a user requiring a free
  1051.       path might not get one if the packet has to pass through a routing
  1052.       domain that does not consider TOS in its routing decisions.
  1053.  
  1054.       Some proposed a slight variant: a TOS value which would mean "I am
  1055.       willing to pay money to have this packet delivered".  This
  1056.       proposal suffers most of the same shortcomings as the previous one
  1057.       and turns out to have an additional interesting quirk: because of
  1058.       the algorithms specified in Section 7.2, any packet which used
  1059.       this TOS value would prefer links that cost money over equally
  1060.       good free links.  Thus, such a TOS value would almost be
  1061.       equivalent to a "maximize monetary cost" value!
  1062.  
  1063.       It seems likely that in the future users may need some mechanism
  1064.       to express the maximum amount they are willing to pay to have a
  1065.       packet delivered.  However, an IP option would be a more
  1066.       appropriate mechanism, since there are precedents for having IP
  1067.       options that all routers are required to honor, and an IP option
  1068.       could include parameters such as the maximum amount the user was
  1069.       willing to pay.  Thus, the TOS value defined in this memo merely
  1070.       requests that the network "minimize monetary cost".
  1071.  
  1072.    B.2  The Specification of the TOS Field
  1073.  
  1074.       There were four goals that guided the decision to have a four bit
  1075.       TOS field and the specification of that field's values:
  1076.  
  1077.        (1) To define a new type of service requesting that the network
  1078.            "minimize monetary cost"
  1079.  
  1080.        (2) To remain as compatible as possible with existing
  1081.            specifications and uses of the TOS facility
  1082.  
  1083.        (3) To allow for the definition and deployment of new types of
  1084.            service in the future
  1085.  
  1086.        (4) To permanently fix the size of the TOS field
  1087.  
  1088.       The last goal may seem surprising, but turns out to be necessary
  1089.       for routing to work correctly when new types of service are
  1090.       deployed.  If routers have different ideas about the size of the
  1091.       TOS field they make inconsistent decisions that may lead to
  1092.       routing loops.
  1093.  
  1094.       At first glance goals (3) and (4) seem to be pretty much mutually
  1095.       exclusive.  The IP header currently has only three unused bits, so
  1096.       at most three new type of service bits could be defined without
  1097.       resorting to the impractical step of changing the IP header
  1098.  
  1099.  
  1100.  
  1101. Almquist                                                       [Page 19]
  1102.  
  1103.  
  1104.  
  1105. RFC 1349                    Type of Service                    July 1992
  1106.  
  1107.  
  1108.       format.  Since one of them would need to be allocated to meet goal
  1109.       (1), at most two bits could be reserved for new or experimental
  1110.       types of service.  Not only is it questionable whether two would
  1111.       be enough, but it is improbable that the IETF and IAB would allow
  1112.       all of the currently unused bits to be permanently reserved for
  1113.       types of service which might or might or might not ever be
  1114.       defined.
  1115.  
  1116.       However, some (if not most of) the possible combinations of the
  1117.       individual bits would not be useful.  Clearly, setting all of the
  1118.       bits would be equivalent to setting none of the bits, since
  1119.       setting all of the bits would indicate that none of the types of
  1120.       optimization was any more important than any of the others.
  1121.       Although one could perhaps assign reasonable semantics to most
  1122.       pairs of bits, it is unclear that the range of network service
  1123.       provided by various paths could usefully be subdivided in so fine
  1124.       a manner.  If some of these non-useful combinations of bits could
  1125.       be assigned to new types of service then it would be possible to
  1126.       meet goal (3) and goal (4) without having to use up all of the
  1127.       remaining reserved bits in the IP header.  The obvious way to do
  1128.       that was to change the interpretation of TOS values so that they
  1129.       were integers rather than independently settable bits.
  1130.  
  1131.       The integers were chosen to be compatible with the bit definitions
  1132.       found in RFC-791.  Thus, for example, setting the TOS field to
  1133.       1000 (minimize delay) sets bit 3 of the Type of Service octet; bit
  1134.       3 is defined as the Low Delay bit in RFC-791.  This memo only
  1135.       defines values which correspond to setting a single one of the
  1136.       RFC-791 bits, since setting multiple TOS bits does not seem to be
  1137.       a common practice.  According to [15], none of the common TCP/IP
  1138.       applications currently set multiple TOS bits.  However, TOS values
  1139.       corresponding to particular combinations of the RFC-791 bits could
  1140.       be defined if and when they are determined to be useful.
  1141.  
  1142.       The new TOS value for "minimize monetary cost" needed to be one
  1143.       which would not be too terribly misconstrued by preexisting
  1144.       implementations.  This seemed to imply that the value should be
  1145.       one which left all of the RFC-791 bits clear.  That would require
  1146.       expanding the TOS field, but would allow old implementations to
  1147.       treat packets which request minimization of monetary cost (TOS
  1148.       0001) as if they had requested the default TOS.  This is not a
  1149.       perfect solution since (as described above) changing the size of
  1150.       the TOS field could cause routing loops if some routers were to
  1151.       route based on a three bit TOS field and others were to route
  1152.       based on a four bit TOS field.  Fortunately, this should not be
  1153.       much of a problem in practice because routers which route based on
  1154.       a three bit TOS field are very rare as this is being written and
  1155.       will only become more so once this specification is published.
  1156.  
  1157.  
  1158.  
  1159. Almquist                                                       [Page 20]
  1160.  
  1161.  
  1162.  
  1163. RFC 1349                    Type of Service                    July 1992
  1164.  
  1165.  
  1166.       Because of those considerations, and also in order to allow a
  1167.       reasonable number of TOS values for future definition, it seemed
  1168.       desirable to expand the TOS field.  That left the question of how
  1169.       much to expand it.  Expanding it to five bits would allow
  1170.       considerable future expansion (27 new TOS values) and would be
  1171.       consistent with Host Requirements, but would reduce to one the
  1172.       number of reserved bits in the IP header.  Expanding the TOS field
  1173.       to four bits would restrict future expansion to more modest levels
  1174.       (11 new TOS values), but would leave an additional IP header bit
  1175.       free.  The IETF's Router Requirements Working Group concluded that
  1176.       a four bits wide TOS field allow enough values for future use and
  1177.       that consistency with Host Requirements was inadequate
  1178.       justification for unnecessarily increasing the size of the TOS
  1179.       field.
  1180.  
  1181.    B.3  The Choice of Weak TOS Routing
  1182.  
  1183.       "Ruminations on the Next Hop" [4] describes three alternative ways
  1184.       of routing based on the TOS field.  Briefly, they are:
  1185.  
  1186.        (1) Strong TOS --
  1187.            a route may be used only if its TOS exactly matches the TOS
  1188.            in the datagram being routed.  If there is no route with the
  1189.            requested TOS, the packet is discarded.
  1190.  
  1191.        (2) Weak TOS --
  1192.            like Strong TOS, except that a route with the default TOS
  1193.            (0000) is used if there is no route that has the requested
  1194.            TOS.  If there is no route with either the requested TOS or
  1195.            the default TOS, the packet is discarded.
  1196.  
  1197.        (3) Very Weak TOS --
  1198.            like Weak TOS, except that a route with the numerically
  1199.            smallest TOS is used if there is no route that has either the
  1200.            requested TOS or the default TOS.
  1201.  
  1202.       This specification has adopted Weak TOS.
  1203.  
  1204.       Strong TOS was quickly rejected.  Because it requires that each
  1205.       router a packet traverses have a route with the requested TOS,
  1206.       packets which requested non-zero TOS values would have (at least
  1207.       until the TOS facility becomes widely used) a high probability of
  1208.       being discarded as undeliverable.  This violates the principle
  1209.       (described in Section 2) that hosts should not be penalized for
  1210.       choosing non-zero TOS values.
  1211.  
  1212.       The choice between Weak TOS and Very Weak TOS was not as
  1213.       straightforward.  Weak TOS was chosen because it is slightly
  1214.  
  1215.  
  1216.  
  1217. Almquist                                                       [Page 21]
  1218.  
  1219.  
  1220.  
  1221. RFC 1349                    Type of Service                    July 1992
  1222.  
  1223.  
  1224.       simpler to implement and because it is consistent with the OSPF
  1225.       and Integrated IS-IS specifications.  In addition, many dislike
  1226.       Very Weak TOS because its algorithm for choosing a route when none
  1227.       of the available routes have either the requested or the default
  1228.       TOS cannot be justified by intuition (there is no reason to
  1229.       believe that having a numerically smaller TOS makes a route
  1230.       better).  Since a router would need to understand the semantics of
  1231.       all of the TOS values to make a more intelligent choice, there
  1232.       seems to be no reasonable way to fix this particular deficiency of
  1233.       Very Weak TOS.
  1234.  
  1235.       In practice it is expected that the choice between Weak TOS and
  1236.       Very Weak TOS will make little practical difference, since (except
  1237.       where the network manager has intentionally set things up
  1238.       otherwise) there will be a route with the default TOS to any
  1239.       destination for which there is a route with any other TOS.
  1240.  
  1241.    B.4  The Retention of Longest Match Routing
  1242.  
  1243.       An interesting issue is how early in the route choice process TOS
  1244.       should be considered.  There seem to be two obvious possibilities:
  1245.  
  1246.        (1) Find the set of routes that best match the destination
  1247.            address of the packet.  From among those, choose the route
  1248.            which best matches the requested TOS.
  1249.  
  1250.        (2) Find the set of routes that best match the requested TOS.
  1251.            From among those, choose the route which best matches the
  1252.            destination address of the packet.
  1253.  
  1254.       The two approaches are believed to support an identical set of
  1255.       routing policies.  Which of the two allows the simpler
  1256.       configuration and minimizes the amount of routing information that
  1257.       needs to be passed around seems to depend on the topology, though
  1258.       some believe that the second option has a slight edge in this
  1259.       regard.
  1260.  
  1261.       Under the first option, if the network manager neglects some
  1262.       pieces of the configuration the likely consequence is that some
  1263.       packets which would benefit from TOS-specific routes will be
  1264.       routed as if they had requested the default TOS.  Under the second
  1265.       option, however, a network manager can easily (accidently)
  1266.       configure things in such a way that packets which request a
  1267.       certain TOS and should be delivered locally will instead follow a
  1268.       default route for that TOS and be dumped into the Internet.  Thus,
  1269.       the first option would seem to have a slight edge with regard to
  1270.       robustness in the face of errors by the network manager.
  1271.  
  1272.  
  1273.  
  1274.  
  1275. Almquist                                                       [Page 22]
  1276.  
  1277.  
  1278.  
  1279. RFC 1349                    Type of Service                    July 1992
  1280.  
  1281.  
  1282.       It has been also been suggested that the first option provides the
  1283.       additional benefit of allowing loop-free routing in routing
  1284.       domains which contain both routers that consider TOS in their
  1285.       routing decisions and routers that do not.  Whether that is true
  1286.       in all cases is unknown.  It is certainly the case, however, that
  1287.       under the second option it would not work to mix routers that
  1288.       consider TOS and routers which do not in the same routing domain.
  1289.  
  1290.       All in all, there were no truly compelling arguments for choosing
  1291.       one way or the other, but it was nontheless necessary to make a
  1292.       choice: if different routers were to make the choice differently,
  1293.       chaos (in the form of routing loops) would result.  The mechanisms
  1294.       specified in this memo reflect the first option because that will
  1295.       probably be more intuitive to most network managers.  Internet
  1296.       routing has traditionally chosen the route which best matches the
  1297.       destination address, with other mechanisms serving merely as tie-
  1298.       breakers.  The first option is consistent with that tradition.
  1299.  
  1300.    B.5  The Use of Destination Unreachable
  1301.  
  1302.       Perhaps the most contentious and least defensible part of this
  1303.       specification is that a packet can be discarded because the
  1304.       destination is considered to be unreachable even though a packet
  1305.       to the same destination but requesting a different TOS would have
  1306.       been deliverable.  This would seem to fall perilously close to
  1307.       violating the principle that hosts should never be penalized for
  1308.       requesting non-default TOS values in packets they originate.
  1309.  
  1310.       This can happen in only three, somewhat unusual, cases:
  1311.  
  1312.        (1) There is a route to the packet's destination which has the
  1313.            TOS value requested in the packet, but the route has an
  1314.            infinite metric.
  1315.  
  1316.        (2) The only routes to the packet's destination have TOS values
  1317.            other than the one requested in the packet.  One of them has
  1318.            the default TOS, but it has an infinite metric.
  1319.  
  1320.        (3) The only routes to the packet's destination have TOS values
  1321.            other than the one requested in the packet.  None of them
  1322.            have the default TOS.
  1323.  
  1324.       It is commonly accepted that a router which has a default route
  1325.       should nonetheless discard a packet if the router has a more
  1326.       specific route to the destination in its forwarding table but that
  1327.       route has an infinite metric.  The first two cases seem to be
  1328.       analogous to that rule.
  1329.  
  1330.  
  1331.  
  1332.  
  1333. Almquist                                                       [Page 23]
  1334.  
  1335.  
  1336.  
  1337. RFC 1349                    Type of Service                    July 1992
  1338.  
  1339.  
  1340.       In addition, it is worth noting that, except perhaps during brief
  1341.       transients resulting from topology changes, routes with infinite
  1342.       metrics occur only as the result of deliberate action (or serious
  1343.       error) on the part of the network manager.  Thus, packets are
  1344.       unlikely to be discarded unless the network manager has taken
  1345.       deliberate action to cause them to be.  Some people believe that
  1346.       this is an important feature of the specification, allowing the
  1347.       network to (for example) keep packets which have requested that
  1348.       cost be minimized off of a link that is so expensive that the
  1349.       network manager feels confident that the users would want their
  1350.       packets to be dropped.  Others (including the author of this memo)
  1351.       believe that this "feature" will prove not to be useful, and that
  1352.       other mechanisms may be required for access controls on links, but
  1353.       couldn't justify changing this specification in the ways necessary
  1354.       to eliminate the "feature".
  1355.  
  1356.       Case (3) above is more problematic.  It could have been avoided by
  1357.       using Very Weak TOS, but that idea was rejected for the reasons
  1358.       discussed in Appendix B.3.  Some suggested that case (3) could be
  1359.       fixed by relaxing longest match routing (described in Appendix
  1360.       B.4), but that idea was rejected because it would add complexity
  1361.       to routers without necessarily making their routing choices
  1362.       particularly more intuitive.  It is also worth noting that this is
  1363.       another case that a network manager has to try rather hard to
  1364.       create: since OSPF and Integrated IS-IS both enforce the
  1365.       constraint that there must be a route with the default TOS to any
  1366.       destination for which there is a route with a non-zero TOS, a
  1367.       network manager would have to await the development of a new
  1368.       routing protocol or create the problem with static routes.  The
  1369.       eventual conclusion was that any fix to case (3) was worse than
  1370.       the problem.
  1371.  
  1372. APPENDIX C.  Limitations of the TOS Mechanism
  1373.  
  1374.    It is important to note that the TOS facility has some limitations.
  1375.    Some are consequences of engineering choices made in this
  1376.    specification.  Others, referred to as "inherent limitations" below,
  1377.    could probably not have been avoided without either replacing the TOS
  1378.    facility defined in RFC-791 or accepting that things wouldn't work
  1379.    right until all routers in the Internet supported the TOS facility.
  1380.  
  1381.    C.1  Inherent Limitations
  1382.  
  1383.       The most important of the inherent limitations is that the TOS
  1384.       facility is strictly an advisory mechanism.  It is not an
  1385.       appropriate mechanism for requesting service guarantees.  There
  1386.       are two reasons why this is so:
  1387.  
  1388.  
  1389.  
  1390.  
  1391. Almquist                                                       [Page 24]
  1392.  
  1393.  
  1394.  
  1395. RFC 1349                    Type of Service                    July 1992
  1396.  
  1397.  
  1398.        (1) Not all networks will consider the value of the TOS field
  1399.            when deciding how to handle and route packets.  Partly this
  1400.            is a transition issue: there will be a (probably lengthy)
  1401.            period when some networks will use equipment that predates
  1402.            this specification.  Even long term, however, many networks
  1403.            will not be able to provide better service by considering the
  1404.            value of the TOS field.  For example, the best path through a
  1405.            network composed of a homogeneous collection of
  1406.            interconnected LANs is probably the same for any possible TOS
  1407.            value.  Inside such a network, it would make little sense to
  1408.            require routers and routing protocols to do the extra work
  1409.            needed to consider the value of the TOS field when forwarding
  1410.            packets.
  1411.  
  1412.        (2) The TOS mechanism is not powerful enough to allow an
  1413.            application to quantify the level of service it desires.  For
  1414.            example, an application may use the TOS field to request that
  1415.            the network choose a path which maximizes throughput, but
  1416.            cannot use that mechanism to say that it needs or wants a
  1417.            particular number of kilobytes or megabytes per second.
  1418.            Because the network cannot know what the application
  1419.            requires, it would be inappropriate for the network to decide
  1420.            to discard a packet which requested maximal throughput
  1421.            because no "high throughput" path was available.
  1422.  
  1423.       The inability to provide resource guarantees is a serious drawback
  1424.       for certain kinds of network applications.  For example, a system
  1425.       using packetized voice simply creates network congestion when the
  1426.       available bandwidth is inadequate to deliver intelligible speech.
  1427.       Likewise, the network oughtn't even bother to deliver a voice
  1428.       packet that has suffered more delay in the network than the
  1429.       application can tolerate.  Unfortunately, resource guarantees are
  1430.       problematic in connectionless networks.  Internet researchers are
  1431.       actively studying this problem, and are optimistic that they will
  1432.       be able to invent ways in which the Internet Architecture can
  1433.       evolve to support resource guarantees while preserving the
  1434.       advantages of connectionless networking.
  1435.  
  1436.    C.2  Limitations of this Specification
  1437.  
  1438.       There are a couple of additional limitations of the TOS facility
  1439.       which are not inherent limitations but instead are consequences of
  1440.       engineering choices made in this specification:
  1441.  
  1442.        (1) Routing is not really optimal for some TOS values.  This is
  1443.            because optimal routing for those TOS values would require
  1444.            that routing protocols be cognizant of the semantics of the
  1445.            TOS values and use special algorithms to compute routes for
  1446.  
  1447.  
  1448.  
  1449. Almquist                                                       [Page 25]
  1450.  
  1451.  
  1452.  
  1453. RFC 1349                    Type of Service                    July 1992
  1454.  
  1455.  
  1456.            them.  For example, routing protocols traditionally compute
  1457.            the metric for a path by summing the costs of the individual
  1458.            links that make up the path.  However, to maximize
  1459.            reliability, a routing protocol would instead have to compute
  1460.            a metric which was the product of the probabilities of
  1461.            successful delivery over each of the individual links in the
  1462.            path.  While this limitation is in some sense a limitation of
  1463.            current routing protocols rather than of this specification,
  1464.            this specification contributes to the problem by specifying
  1465.            that there are a number of legal TOS values that have no
  1466.            currently defined semantics.
  1467.  
  1468.        (2) This specification assumes that network managers will do "the
  1469.            right thing".  If a routing domain uses TOS, the network
  1470.            manager must configure the routers in such a way that a
  1471.            reasonable path is chosen for each TOS.  While this ought not
  1472.            to be terribly difficult, a network manager could accidently
  1473.            or intentionally violate our rule that using the TOS facility
  1474.            should provide service at least as good as not using it.
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507. Almquist                                                       [Page 26]
  1508.  
  1509.  
  1510.  
  1511. RFC 1349                    Type of Service                    July 1992
  1512.  
  1513.  
  1514. References
  1515.  
  1516.   [1]   Internet Engineering Task Force (R. Braden, Editor),
  1517.         "Requirements for Internet Hosts -- Communication Layers", RFC
  1518.         1122, USC/Information Sciences Institute, October 1989.
  1519.  
  1520.   [2]   Internet Engineering Task Force (R. Braden, Editor),
  1521.         "Requirements for Internet Hosts -- Application and Support",
  1522.         RFC 1123, USC/Information Sciences Institute, October 1989.
  1523.  
  1524.   [3]   Almquist, P., "Requirements for IP Routers", Work in progress.
  1525.  
  1526.   [4]   Almquist, P., "Ruminations on the Next Hop", Work in progress.
  1527.  
  1528.   [5]   Baker, F. and R. Coltun, "OSPF Version 2 Management Information
  1529.         Base", RFC 1248, ACC, Computer Science Center, August 1991.
  1530.  
  1531.   [6]   Braden, R. and J. Postel, "Requirements for Internet Gateways",
  1532.         RFC 1009, USC/Information Sciences Institute, June 1987.
  1533.  
  1534.   [7]   Callon, R., "Use of OSI IS-IS for Routing in TCP/IP and Dual
  1535.         Environments", RFC 1195, Digital Equipment Corporation, December
  1536.         1990.
  1537.  
  1538.   [8]   Deering, S., "ICMP Router Discovery Messages", RFC 1256, Xerox
  1539.         PARC, September 1991.
  1540.  
  1541.   [9]   Mogul, J. and J. Postel, "Internet Standard Subnetting
  1542.         Procedure", RFC 950, USC/Information Sciences Institute, August
  1543.         1985.
  1544.  
  1545.  [10]   Moy, J., "OSPF Version 2", RFC 1247, Proteon, Inc., July 1991.
  1546.  
  1547.  [11]   Postel, J., "Internet Protocol", RFC 791, DARPA, September 1981.
  1548.  
  1549.  [12]   Postel, J., "Internet Control Message Protocol", RFC 792, DARPA,
  1550.         September 1981.
  1551.  
  1552.  [13]   Postel, J., "Transmission Control Protocol", RFC 793, DARPA,
  1553.         September 1981.
  1554.  
  1555.  [14]   Prue, W. and J. Postel, "A Queuing Algorithm to Provide Type-
  1556.         of-Service for IP Links", RFC 1046, USC/Information Sciences
  1557.         Institute, February 1988.
  1558.  
  1559.  [15]   Reynolds, J. and J. Postel, "Assigned Numbers", RFC 1060,
  1560.         USC/Information Sciences Institute, March 1990.
  1561.  
  1562.  
  1563.  
  1564.  
  1565. Almquist                                                       [Page 27]
  1566.  
  1567.  
  1568.  
  1569. RFC 1349                    Type of Service                    July 1992
  1570.  
  1571.  
  1572. Acknowledgements
  1573.  
  1574.    Some of the ideas presented in this memo are based on discussions
  1575.    held by the IETF's Router Requirements Working Group.  Much of the
  1576.    specification of the treatment of Type of Service by hosts is merely
  1577.    a restatement of the ideas of the IETF's former Host Requirements
  1578.    Working Group, as captured in RFC-1122 and RFC-1123.  The author is
  1579.    indebted to John Moy and Ross Callon for their assistance and
  1580.    cooperation in achieving consistency among the OSPF specification,
  1581.    the Integrated IS-IS specification, and this memo.
  1582.  
  1583.    This memo has been substantially improved as the result of thoughtful
  1584.    comments from a number of reviewers, including Dave Borman, Bob
  1585.    Braden, Ross Callon, Vint Cerf, Noel Chiappa, Deborah Estrin, Phill
  1586.    Gross, Bob Hinden, Steve Huston, Jon Postel, Greg Vaudreuil, John
  1587.    Wobus, and the Router Requirements Working Group.
  1588.  
  1589.    The initial work on this memo was done while its author was an
  1590.    employee of BARRNet.  Their support is gratefully acknowledged.
  1591.  
  1592. Security Considerations
  1593.  
  1594.    This memo does not explicitly discuss security issues.  The author
  1595.    does not believe that the specifications in this memo either weaken
  1596.    or enhance the security of the IP Protocol or of the other protocols
  1597.    mentioned herein.
  1598.  
  1599. Author's Address
  1600.  
  1601.    Philip Almquist
  1602.    214 Cole Street, Suite 2
  1603.    San Francisco, CA 94117-1916
  1604.  
  1605.    Phone: 415-752-2427
  1606.  
  1607.    Email: almquist@Jessica.Stanford.EDU
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623. Almquist                                                       [Page 28]
  1624.  
  1625.